package com.gzy.blog.blog.service;

import java.util.List;

import com.gzy.blog.blog.entity.Article;
import com.gzy.blog.blog.entity.Blog;
import com.gzy.blog.blog.entity.Category;
import com.gzy.blog.blog.entity.Discuss;
import com.gzy.blog.common.PageModel;

public interface BlogService {

	void add(Blog blog);

	Blog get(Integer integer);

	PageModel<Blog> listBlogPage(Integer pageNo, Integer pageSize);

	void delete(Blog blog);

	void update(Blog blog);

	PageModel<Blog> listBlogWithUser(int pageNo, int pageSize);

	PageModel<Article> pageArticle(int pageNo, int pageSize);

	Blog getBlogByUserId(Integer userId);

	PageModel<Article> getArticlePageByUserId(Integer userId);

	List<Article> listWellAticle();

	Blog getBlogByArticleId(Integer id);

	Article getArticleById(Integer id);

	List<Discuss> getDiscussListByArticleId(Integer id);

	Blog getBlogById(Integer id);

	List<Article> listWellAticleSelf(Integer userId);

	void deleteDiscussById(Integer id);

	PageModel<Discuss> pageDiscuss(int pageNo, int pageSize);

	void addDiscuss(Discuss discuss);

	List<Category> listCategorySelf(Integer userId);

	List<Article> listArticleCategory(Integer userId);

	PageModel<Category> pageCategory(int pageNo, int pageSize);

	int getSun(List<Article> categoryList);

	Article getSingleArticle(Integer id);

	void addCategory(Category category);

	void addArticle(Article article);

	void deleteArticle(Integer id);

	void deleteCategory(Integer id);
}
